package com.meixiang.activity.account.myMoneyManagement;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.View;
import android.widget.TextView;

import com.meixiang.R;
import com.meixiang.fragment.moneyManagement.MoneyManagementFragment;
import com.meixiang.main.BaseActivity;
import com.meixiang.tool.Tool;
import com.meixiang.view.TitleView;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * @author yinsujun  Created at 2016/5/6 13:41
 *         我的理财
 */
public class MyMoneyManagementActivity extends BaseActivity {
    @Bind(R.id.title)
    TitleView title;
    @Bind(R.id.money_management_tv_total_money)
    TextView tvTotalMoney;
    FragmentManager manager;
    FragmentTransaction transaction;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        setContentView(R.layout.activity_my_money_management);
        ButterKnife.bind(this);
        super.onCreate(savedInstanceState);
    }

    @Override
    protected void initTitle() {
        setRightTitleBackground("我的理财", "统计", R.mipmap.ic_white_back, new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Tool.showTextToast(context,"统计");
                Intent intent=new Intent(context, StatisticsActivity.class);
                startActivity(intent);
            }
        });

    }

    @Override
    protected void initView() {
        manager=getSupportFragmentManager();
        transaction=manager.beginTransaction();
        transaction.add(R.id.money_management_frame_content,new MoneyManagementFragment());
        transaction.commit();

    }

    @Override
    protected void setData() {

    }

    @Override
    public void onClick(View v) {

    }
}
